letter.java
Language: Java
Last Modified: 2020-06-27 1:58:33 PM UTC
File Size: 417 bytes
Last Modified: 2020-06-27 1:58:33 PM UTC
File Size: 417 bytes
http://www.penguinstew.ca/example/hangman/letter.java
public class letter {
private char value;
private boolean print;
public letter(char name) {
this.value = name;
if (name == ' ' || name == '-') {
this.print = true;
} else {
this.print = false;
}
}
public char getValue() {
return this.value;
}
public boolean getPrint() {
return this.print;
}
public void setPrint(boolean set) {
this.print = set;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27